package com.redislock.aop.tool.enums;

import cn.hutool.core.util.StrUtil;
import lombok.Getter;

public enum RedisLockTypeEnum {
    PARAMSIFICATION("paramsification","执行办法分布式加锁"),
    TIMINGIDENTIFICATION("timingidentification","定时分布式加锁");



    RedisLockTypeEnum(String code,String name) {
        this.code = code;
        this.name=name;
    }

    @Getter
    private String code;

    @Getter
    private String name;

    public String getUniqueKey(String key){
        return StrUtil.format("{}:{}",this.code,key);
    }

}
